/* eslint-disable */
// @ts-ignore
import request from '@/utils/http';

import * as API from './types';

/** 购买商品 POST /sco/open/goods/buy */
export async function scoOpenGoodsBuyUsingPost({
  body,
  options,
}: {
  body: API.ScoGoodsShopBuyBo;
  options?: { [key: string]: unknown };
}) {
  return request<API.RBoolean>('/sco/open/goods/buy', {
    method: 'POST',
    headers: {
      'Content-Type': 'application/json',
    },
    data: body,
    ...(options || {}),
  });
}

/** 用户购买历史分页查询 POST /sco/open/goods/pageData */
export async function scoOpenGoodsPageDataUsingPost({
  body,
  options,
}: {
  body: API.ScoUserGoodsBoScoOpenGoodsPageData;
  options?: { [key: string]: unknown };
}) {
  return request<API.RPageDataVoScoUserGoodsVo>('/sco/open/goods/pageData', {
    method: 'POST',
    headers: {
      'Content-Type': 'application/json',
    },
    data: body,
    ...(options || {}),
  });
}

/** 确认签收 POST /sco/open/goods/updateData */
export async function scoOpenGoodsUpdateDataUsingPost({
  body,
  options,
}: {
  body: API.ScoUserGoodsBoScoOpenGoodsUpdateData;
  options?: { [key: string]: unknown };
}) {
  return request<API.RBoolean>('/sco/open/goods/updateData', {
    method: 'POST',
    headers: {
      'Content-Type': 'application/json',
    },
    data: body,
    ...(options || {}),
  });
}
